import request from '@/utils/request';

/**
 * 分组搜索
 * @param data
 * @returns {PromiseLike<T | never> | Promise<T | never> | *}
 */
// 新建分组
export const creatGroup = (data: any) => {
    return request({
        url: '/scrm-api/console/tenant/group/create',
        method: 'post',
        data
    });
};
//更新 分组内容
export const updateGroup = (data: any) => {
    return request({
        url: '/scrm-api/console/tenant/group/update',
        method: 'post',
        data
    });
};
// 删除 分组
export const delGroup = (data: any) => {
    return request({
        url: '/scrm-api/console/tenant/group/destroy',
        method: 'post',
        data
    });
};
//获取 分组列表
export const getGroupList = (data: any) => {
    return request({
        url: '/scrm-api/console/tenant/group/getLists',
        method: 'get',
        params: data
    });
};
//获取敏感词列表
export const getSensitiveList = (data: any) => {
    return request({
        url: '/scrm-api/console/riskmonitoring/sensitivethesaurus/sensitive-words-list',
        method: 'get',
        params: data
    });
};
//新建敏感词
export const newSensitive = (data: any) => {
    return request({
        url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/add-sensitive-words',
        method: 'post',
        data,
        noNeedLoading: true
    });
};
//获取敏感词列表
export const getSensitivelist = (data: any) => {
    return request({
        url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/sensitive-words-list',
        method: 'post',
        params: data,
        noNeedLoading: true
    });
};
//删除敏感词数据
export const deleteSensitivelist = (data: any) => {
    return request({
        url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/batch-delete',
        method: 'post',
        data,
        noNeedLoading: true
    });
};
//开启
export const openSensitivelist = (data: any) => {
    return request({
        url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/batch-open',
        method: 'post',
        data,
        noNeedLoading: true
    });
};
//关闭
export const closeSensitivelist = (data: any) => {
    return request({
        url: 'scrm-api/console/riskmonitoring/sensitivethesaurus/batch-close',
        method: 'post',
        data,
        noNeedLoading: true
    });
};
